# 4.3
for value in range(1,21):
    print(value)

# 4.4-4.5
# a_num = list(range(1,1_000_000))
# print(a_num)
# print(min(a_num))
# print(max(a_num))
# print(sum(a_num))

# 4.6
nums = list(range(1,21,2))
for value in nums:
    print(value)

# 4.7
nums = list(range(3,31,3))
for value in nums:
    print(value)

# 4.8
cubes = []
for value in range(1,11):
    cubes.append(value**3)
print(cubes)

# 4.9
cubes = [value**3 for value in range(1,11)]
print(cubes)

# 4.10
print("The first three items in the list are:")
print(cubes[:3])
print("\nThe items from the middle of the list are:")
print(cubes[3:6])
print("\nThe last three items in the list are:")
print(cubes[-3:])